using System.Linq;
using SubsidiosBussinessLogic.Models;
using SubsidiosBussinessLogic.DataAccess.Interfaces;

namespace SubsidiosBussinessLogic.DataAccess.SqlServerRepository
{
    public class AlcanceRepository : Repository<Alcance>, IAlcanceRepository
    {
        public AlcanceRepository(IDataContextFactory dataContextFactory) : base(dataContextFactory)
        {
        }

        public IQueryable<Alcance> GetAlcances()
        {
            return All();
        }

        public Alcance CreateAlcance()
        {
            return CreateInstance();
        }

        public void DeleteAlcance(Alcance alcance)
        {
            MarkForDeletion(alcance);
            SaveAll();
        }

        public void SaveAlcance()
        {
            SaveAll();
        }

        
    }
}